from typing import Union, Any, Optional, List
from pydantic import BaseModel, Field

# 针对User的参数校验类
class User(BaseModel):
    # 非必填
    id: int | None = None
    name: str
    password: str | None = None
    avatar: str | None = None
    # 存储图片路径
    avatarpath: str | None = None
    sex: int | None = None
    phone: str | None = None
    status: int | None = None
    nickname: str | None = None
    action_id: int | str | None = None
    # 权限
    role:int|str| None = None

# 删除校验
class DelBatch(BaseModel):
    uids: List[str | int] = []
